#include "arrayIndex.h"
#include <Functions/FunctionFactory.h>

namespace DB
{
struct NameHas { static constexpr auto name = "has"; };

/// has(arr, x) - whether there is an element x in the array.
using FunctionHas = FunctionArrayIndex<HasAction, NameHas>;

REGISTER_FUNCTION(Has)
{
    factory.registerFunction<FunctionHas>();
    factory.registerAlias("contains", NameHas::name, FunctionFactory::CaseInsensitive);
}

}
